/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de Almeria
 * License Type: Purchased
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class RegistroCriteria extends AbstractORMCriteria {
	public final StringExpression telefono;
	public final StringExpression nombre;
	
	public RegistroCriteria(Criteria criteria) {
		super(criteria);
		telefono = new StringExpression("telefono", this);
		nombre = new StringExpression("nombre", this);
	}
	
	public RegistroCriteria(PersistentSession session) {
		this(session.createCriteria(Registro.class));
	}
	
	public RegistroCriteria() throws PersistentException {
		this(orm.AgendaRMI2PersistentManager.instance().getSession());
	}
	
	public Registro uniqueRegistro() {
		return (Registro) super.uniqueResult();
	}
	
	public Registro[] listRegistro() {
		return (Registro[]) super.list().toArray(new Registro[super.list().size()]);
	}
}

